/*
*/

#ifndef PSORUNNER_H
#define PSORUNNER_H

#include <QThread>

#include "pso.h"

class PsoRunner : public QThread
{
   Q_OBJECT
   
   public:
      PsoRunner( QObject *parent = 0 );
      PsoRunner( Pso pso, QObject *parent = 0 );
      
      void setPso( Pso pso );
      Pso pso();
      
      void stopOptimizing();
      
      virtual void run();
   
   signals:
      void sampleCompleted( int sample );
      void iterationCompleted( int iter );
      void newBestFitnessFound( double fitness );
      
   private:
      Pso m_pso;
};

#endif // PSORUNNER_H
